home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / lib / include / net / RCS / raw_cb.h,v < prev    next >
Encoding:
Text File  |  1988-06-29  |  2.2 KB  |  105 lines

  1. head     1.2;
  2. access   ;
  3. symbols  ;
  4. locks    ; strict;
  5. comment  @ * @;
  6.  
  7.  
  8. 1.2
  9. date     88.06.29.15.14.22;  author ouster;  state Exp;
  10. branches ;
  11. next     1.1;
  12.  
  13. 1.1
  14. date     88.06.21.16.56.38;  author ouster;  state Exp;
  15. branches ;
  16. next     ;
  17.  
  18.  
  19. desc
  20. @@
  21.  
  22.  
  23. 1.2
  24. log
  25. @Add ifdefs so files won't be processed twice.
  26. @
  27. text
  28. @/*
  29.  * Copyright (c) 1980, 1986 Regents of the University of California.
  30.  * All rights reserved.
  31.  *
  32.  * Redistribution and use in source and binary forms are permitted
  33.  * provided that this notice is preserved and that due credit is given
  34.  * to the University of California at Berkeley. The name of the University
  35.  * may not be used to endorse or promote products derived from this
  36.  * software without specific prior written permission. This software
  37.  * is provided ``as is'' without express or implied warranty.
  38.  *
  39.  *    @@(#)raw_cb.h    7.2 (Berkeley) 12/30/87
  40.  */
  41.  
  42. #ifndef _RAW_CB
  43. #define _RAW_CB
  44.  
  45. /*
  46.  * Raw protocol interface control block.  Used
  47.  * to tie a socket to the generic raw interface.
  48.  */
  49. struct rawcb {
  50.     struct    rawcb *rcb_next;    /* doubly linked list */
  51.     struct    rawcb *rcb_prev;
  52.     struct    socket *rcb_socket;    /* back pointer to socket */
  53.     struct    sockaddr rcb_faddr;    /* destination address */
  54.     struct    sockaddr rcb_laddr;    /* socket's address */
  55.     struct    sockproto rcb_proto;    /* protocol family, protocol */
  56.     caddr_t    rcb_pcb;        /* protocol specific stuff */
  57.     struct    mbuf *rcb_options;    /* protocol specific options */
  58.     struct    route rcb_route;    /* routing information */
  59.     short    rcb_flags;
  60. };
  61.  
  62. /*
  63.  * Since we can't interpret canonical addresses,
  64.  * we mark an address present in the flags field.
  65.  */
  66. #define    RAW_LADDR    01
  67. #define    RAW_FADDR    02
  68. #define    RAW_DONTROUTE    04        /* no routing, default */
  69.  
  70. #define    sotorawcb(so)        ((struct rawcb *)(so)->so_pcb)
  71.  
  72. /*
  73.  * Nominal space allocated to a raw socket.
  74.  */
  75. #define    RAWSNDQ        2048
  76. #define    RAWRCVQ        2048
  77.  
  78. /*
  79.  * Format of raw interface header prepended by
  80.  * raw_input after call from protocol specific
  81.  * input routine.
  82.  */
  83. struct raw_header {
  84.     struct    sockproto raw_proto;    /* format of packet */
  85.     struct    sockaddr raw_dst;    /* dst address for rawintr */
  86.     struct    sockaddr raw_src;    /* src address for sbappendaddr */
  87. };
  88.  
  89. #ifdef KERNEL
  90. struct rawcb rawcb;            /* head of list */
  91. #endif
  92.  
  93. #endif _RAW_CB
  94. @
  95.  
  96.  
  97. 1.1
  98. log
  99. @Initial revision
  100. @
  101. text
  102. @d15 3
  103. d65 2
  104. @
  105.